package com.bgs.controller;

import com.bgs.entity.Store;
import com.bgs.service.StoreService;
import com.bgs.tool.R;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("store")
public class StoreController {
    @Autowired
    private
    StoreService storeService;
    @GetMapping("load2/{storeId}")
    public R load2(@PathVariable Integer storeId){
        List<Store> stores =  storeService.load2(storeId);
        return R.ok().data("arr2",stores);
    }
}